import {
  BrowserRouter as Router,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom'
import './App.scss'
import layout from './pages/layout'
import Login from './pages/Login'
import NodFount from './pages/NodFount'
import { AuthRoute } from '@/components/AuthRoute'
function App() {
  return (
    <Router>
      <div className="app">
        <Switch>
          <Route exact path="/" render={() => <Redirect to="/login" />} />

          <AuthRoute path="/home" component={layout}></AuthRoute>
          <Route path="/login" component={Login}></Route>
          <Route>
            <NodFount />
          </Route>
        </Switch>
      </div>
    </Router>
  )
}

export default App
